<table class="table table-striped table-hover">
<tr>
	<td>
		<select ng-model="vm.list.tid" ng-options="i.name for i in vm.data.tid" class="form-control">
		</select>
	</td>
	<td>
		<select ng-model="vm.list.typ" ng-options="i.name for i in vm.data.typ" class="form-control">
		</select>
	</td>
	<td>
		<select ng-model="vm.list.format" ng-options="i.name for i in vm.data.format" class="form-control">
		</select>
	</td>
	<td>
		<select ng-model="vm.list.sektion" ng-options="i.name for i in vm.data.sektion" class="form-control">
		</select>
	</td>
	<td>
		<select ng-model="vm.list.sort" ng-options="i.name for i in vm.data.sort" class="form-control">
		</select>
	</td>
	<td>
		<select ng-model="vm.list.genre" ng-options="i.id for i in vm.data.genres" class="form-control">
			<option value="">-- {{ 'START.ALL_GENRES' | translate }} --</option>
		</select>
	</td>
	<td>
		<button ng-click="vm.add()" class="btn btn-default"><i class="fa fa-plus"></i> {{ 'START.ADD' | translate }}</button>
	</td>
</tr>
</table>
<br />
<loading-indicator hide="vm.highligtedTorrents"></loading-indicator>

<div ng-show="vm.highligtedTorrents">
	<div ng-repeat="row in vm.highligtedTorrents track by row.id" style="clear: left;">
		<div class="panel panel-green">
			<div class="panel-heading">{{ ::row.headline }}</div>
			<div ng-repeat="torrent in ::row.torrents" class="col-md-2 col-sm-4 col-xs-6 highlightedRow">
				<div class="cover">
					<a href="" ui-sref="torrent({id: torrent.id, name: torrent.name})">
						<img class="poster" ng-src="/img/imdb/{{ ::torrent.imdbid }}.jpg" alt="Poster" />
					</a>
				</div>
			</div>
			<br style="clear: both" />
			<div class="text-center">
				<button ng-hide="$index == 0" ng-click="vm.move(row.id, 0)" class="btn btn-default"><i class="fa fa-arrow-up"></i> {{ 'START.MOVE_UP' | translate }}</button>
				<button ng-hide="$index == vm.highligtedTorrents.length-1" ng-click="vm.move(row.id, 1)" class="btn btn-default"><i class="fa fa-arrow-down"></i> {{ 'START.MOVE_DOWN' | translate }}</button>
				<button ng-click="vm.delete(row.id)" class="btn btn-default"><i class="fa fa-trash-o"></i> {{ 'START.DELETE' | translate }}</button>
			</div>
			<br style="clear: both;" />
		</div>
	</div>
</div>
<div class="text-center">
{{ 'START.RESTORE_START' | translate }}
	<button ng-click="vm.reset(1)" class="btn btn-default">DVDR</button>
	<button ng-click="vm.reset(2)" class="btn btn-default">720p HD</button>
	<button ng-click="vm.reset(3)" class="btn btn-default">1080p HD</button>
</div>
